﻿/*****************************************************
**Copyright(C), 2021-2022, Ciqtek Technology.
**Version:     1.0
**Author:      hujr
**Date:        2021/12/03
**Description: 默认创建SnapImgItem委托类
*****************************************************/

#ifndef SNAPIMGITEMDELEGATE_H
#define SNAPIMGITEMDELEGATE_H

#include "../../ofuidll_global.h"

#include <QObject>
#include <QStyledItemDelegate>

namespace OfUI {

	class SnapImgItem;
	struct SnapDataGroup;
	enum class GroupType;
	class OFUIDLL_EXPORT SnapImgItemDelegate : public QStyledItemDelegate
	{
		Q_OBJECT

	public:
		explicit SnapImgItemDelegate(QObject *parent = nullptr);
		~SnapImgItemDelegate();

		/**
		 * @brief  createEditor 创建SnapImgItem虚函数
		 * @return SnapImgItem*
		 */
		virtual SnapImgItem* createEditor();

		/**
		 * @brief  getItemGroupTitle 获取Item组标题
		 * @param  group
		 * @param  eType
		 * @return QString
		 */
		virtual QString getItemGroupTitle(const SnapDataGroup& group, const GroupType& eType);
	};

}

#endif // SNAPIMGITEMDELEGATE_H
